package com.graduation.community_manager.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.graduation.community_manager.entity.CmEleWaterEntity;
import com.graduation.community_manager.vo.PageCmEleWaterVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CmEleWaterDao extends BaseMapper<CmEleWaterEntity> {
//    @Select({"<script>",
//            "SELECT * FROM cm_electricity_water",
//            "<where>",
//            "<if test='vo.userId != null'>",
//            "AND user_id = #{vo.userId}",
//            "</if>",
//            "<if test='vo.startTime != null'>",
//            "AND electricity_pay_time &gt;= #{vo.startTime}",
//            "</if>",
//            "<if test='vo.endTime != null'>",
//            "AND electricity_pay_time &lt;= #{vo.endTime}",
//            "</if>",
//            "<if test='vo.startTime != null'>",
//            "AND water_pay_time &gt;= #{vo.startTime}",
//            "</if>",
//            "<if test='vo.endTime != null'>",
//            "AND water_pay_time &lt;= #{vo.endTime}",
//            "</if>",
//            "</where>",
//            "</script>"})
    List<CmEleWaterEntity> getInfo(@Param("vo") PageCmEleWaterVO vo);
}
